package com.caishi.lkx.common.config;

import com.caishi.lkx.common.NacosDiamond;
import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

/**
 * @author by keray
 * date:2021/4/6 3:30 下午
 */
@ConfigurationProperties(prefix = "nacos.config.other")
@Configuration(proxyBeanMethods = false)
@Getter
@Setter
public class DiamondConfig implements NacosDiamond {
    // 城市获取连接
    private String citySyncUrl;
    // 登录失败次数
    private Integer loginFailLockCount = 5;
    // 登录锁定秒数
    private Integer loginLockSeconds = 60;
    // 验证码有效时间（分钟）
    private Integer smsCodeTimeMinute = 15;
    // 用户默认头像
    private String userDefaultHeader = "https://yun-cdn.caishi.cn/static/default_header.png";
    // 手机号注册默认密码
    private String userDefaultPassword = "tk123456";
    // 短信签名key
    private String smsSignKey = "ce647efa-fc80-45a4-bec1-d5f9aa62d167";
    // 旋转验证图片地址
    private List<String> imageCodeUrls = new LinkedList<>() {{
        add("https://cdn.caishi.cn/cdn/191b0fda3839194f6128b9df2d54dabd.jpeg");
    }};

    // 订单多少分钟过期
    private Integer orderExpireSeconds = 30 * 60;
    // 订单自动完成天数
    private Integer orderDefaultFinishDay = 5;
    // 订单支付有效时间（秒）
    private Integer orderPayValiditySeconds = 30 * 60;

    //机构经纬度有效范围
    private Integer groupDistance = 3;
    //用户绑定机构时初始的有效期(天)
    private long userGroupInitExpireDay = 90L;
    //机构交卷时间间隔控制
    private int groupSubmitPaperTime = 3 * 60 * 1000;

    //非机构交卷时间间隔控制
    private int otherSubmitPaperTime = 5 * 60 * 1000;
    // webpush服务域名
    private String webPushDomain;
    // webpush服务名
    private String webPushService = "vers7";
    // 域名白名单问题
    private Map<String/*类型*/,List<String>> ipFilter = new HashMap<>();
    // 域名黑名单问题
    private Map<String,List<String>> ipReject = new HashMap<>();
    // 密码正则
    private String passRegex = "";
    // 密码正则描述
    private String passRegexDesc = "";


}
